<include file="Public:header" />
<style type="text/css">
    ul li{
        list-style: none;
        margin-bottom: 15px;
    }
</style>
<!-- main content start-->
<div class="main-content" >

    <!-- header section start-->
    <div class="header-section">

        <!--toggle button start-->
        <a class="toggle-btn"><i class="fa fa-bars"></i></a>
        <!--toggle button end-->
        <!--notification menu start -->
        <div class="menu-right">
            <ul class="notification-menu">
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <img src="__IMG__/photos/user-avatar.png" alt="" />
                        {$shopname}
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                        <li><a href="{:U('Rootadmin/Login/changePwd')}"><i class="fa fa-cog"></i>  修改密码</a></li>
                        <li><a href="{:U('Rootadmin/Login/logout')}"><i class="fa fa-cog"></i>  退出登录</a></li>
                    </ul>
                </li>

            </ul>
        </div>
        <!--notification menu end -->

    </div>
    <!-- header section end-->
    <!-- page heading start-->
    <div class="page-heading">
        <h3>
            商户管理
        </h3>
        <ul class="breadcrumb">
            <li>
                <a href="#">首页</a>
            </li>
            <li> 商户管理 </li>
            <li class="active"> 修改商户信息 </li>
        </ul>
    </div>
    <!-- page heading end-->
    <!--body wrapper start-->
    <div class="wrapper">
        <section class="panel">
            <header class="panel-heading">
                修改商户信息
            </header>
            <div class="panel-body">

                <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" >
                    <input type="hidden" name="id" value="{$info.id}">
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">联系人</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="linker" id="linker" class="form-control" placeholder="商户联系人" value="{$info.linker}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">联系电话</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="phone" id="phone" class="form-control" placeholder="商户联系电话" value="{$info.phone}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">账号</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="account" id="account" class="form-control" placeholder="账号" value="{$info.account}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">收费类型</label>
                        <div class="col-md-6 col-sm-6">
                            <select name="type" id="type" class="form-control">
                                <option value="1" <eq name="info.type" value="1">selected</eq>>免费</option>
                                <option value="2" <eq name="info.type" value="2">selected</eq>>收费</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">费率</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="number" name="rate" id="rate" class="form-control" placeholder="付费费率(%)" value="{$info.rate}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">密码</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="password" name="password" id="password" class="form-control" placeholder="不修改密码请留空">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">有效期</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="date" name="expiry_time" id="expiry_time" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-md-6 col-sm-6">
                            <button type="submit" class="btn btn-primary" onclick="return checkout()">确认添加</button>
                            <button type="button" class="btn btn-primary" onclick="history.go(-1)">返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </section>
    </div>
    <!--body wrapper end-->
    <!-- main content end-->
    <script>
        function checkout(){
            if($("#linker").val()==""){
                toast("联系人不得为空",false);
                return false;
            }
            if($("#phone").val()==""){
                toast("联系人电话不得为空",/*/8////8/8/89*///8);
                return false;
            }
            return true;
        }
    </script>
    <include file="Public:footer" />